<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
  <title>Document</title>
  <style>
    
  </style>
</head>
<body>
  
</body>
<script>

  // var str = "abc265bbcaa689bcAsd1243Aabc57";
  // console.log( str );
  // console.log( str.replace(/a/, "*" ) );
  // console.log( str.replace(/a/g, "*" ) );
  // console.log( str.replace(/a/ig, "*" ) );
  // console.log( str.replace(/b/, "*" ) );
  // console.log( str.replace(/ab/, "*" ) );
  // console.log( str.replace(/abc/, "*" ) );
  
  // console.log( str.replace(/0/, "*" ) );
  // console.log( str.replace(/1/, "*" ) );
  
  // console.log( str.replace(/\d/g, "*" ) );
  // console.log( str.replace(/\d/ig, "*" ) );
  
  // console.log( str.replace(/\d+/g, "*" ) );



  // ============


  // var str = "@ab6b_ab8a-z92_43!a-zAabc57";
  // console.log( str );
  // console.log( str.replace(/ab/ig, "*" ) );
  // console.log( str.replace(/a|b/ig, "*" ) );
  // console.log( str.replace(/[ab]/ig, "*" ) );
  // console.log( str.replace(/[a-z]/ig, "*" ) );
  // console.log( str.replace(/a-z/ig, "*" ) );
  // console.log( str.replace(/[^a-z]/ig, "*" ) );

  // console.log( str.replace(/[^0-9]/ig, "*" ) );
  // console.log( str.replace(/\D/ig, "*" ) );
  // console.log( str.replace(/\d/ig, "*" ) );
  
  // console.log( str.replace(/\w/g, "*" ) );
  // console.log( str.replace(/[0-9a-zA-Z_]/g, "*" ) );

  // console.log( str.replace(/\W/g, "*" ) );


  // ============

  var str = "as  h@#16  37.%^fd\n2.3.!@#.43 56";

  console.log(str);

  console.log( str.replace(/\s/g, "*" ) );
  console.log( str.replace(/\S/g, "*" ) );
  
  console.log( str.replace(/./g, "*" ) );
  
  console.log( str.replace(/\./g, "*" ) );




  
</script>
</html>